#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
void init(int arr[]) {
	for (int i = 0; i < 10; i++) {
		arr[i] = 0;
	}
}
void fuzhi(int arr[]) {
	for (int i = 0; i < 10; i++) {
		scanf("%d", &arr[i]);
	}
}
void print(int arr[]) {
	for (int i = 0; i < 10; i++) {
		printf("%d ", arr[i]);
	}
	printf("\n");
}
void reverse(int arr[]) {
	int i, j;
	j = 9;
	for( i=0, j;i<j;i++,j--){
		int temp;
		temp = arr[j];
		arr[j] = arr[i];
		arr[i] =temp;
	}
	for (int m = 0; m < 10; m++) {
		printf("%d ", arr[m]);
	}
}
int main() {
	int arr1[10];
	init(arr1);
	fuzhi(arr1);
	print(arr1);
	reverse(arr1);
	return 0;
}